package com.server.server;

import org.apache.mina.core.session.IoSession;

import com.webserver.server.net.BaseMessage;
import com.webserver.server.net.BaseServer;
import com.server.app.PlayerManager;
import com.server.protocols.SProtocols;
import com.server.request.EntryGameReq;
import com.server.response.EntryGameResp;

public class EntryGameServer implements BaseServer {
	public int GetProtocol() {
		return SProtocols.ENTRY_GAME;
	}

	public BaseMessage GetRequest() {
		return new EntryGameReq();
	}

	public BaseMessage handle(IoSession is,BaseMessage request) {
		EntryGameReq req = (EntryGameReq)request;
		PlayerManager.GetInstance().PlayerLogin(req.app_id, req.uid, req.getUserInfo(), req.data);
		EntryGameResp egr = new EntryGameResp(1);
		return egr;
	}
}